import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

const store = new Vuex.Store({
	state: {
		loading:true
	},
	mutations: {
		
		switch_loading(state,tf){
			if(tf){
				if(tf=="true"){
					tf = true
				}else{
					tf = false
				}
				// console.log("手动-->" + tf)
				state.loading = tf;
			}else{
				state.loading = !state.loading
				// console.log("自动-->" + state.loading)
			}
		}
	},
	actions: {
		 
	}
})

export default store
